<?php
require_once("../../config/config.inc.php");
require_once("../../config/ucenter.inc.php");

$aDefaultWeek = "0111110"; //from sunday to saturday.
$aDefaultTime = array("AM_START_TIME"=>"09:00","AM_END_TIME"=>"12:00",
    "PM_START_TIME"=>"13:00","PM_END_TIME"=>"18:00");

$SM->assign("aSECURITY",$DICT->getComboStore("BASE_SECURITY",false));
$SM->assign("sSECURITY","2");
$SM->assign("aImportance",$DICT->getComboStore("BASE_IMPORTANCE",false));
$SM->assign("sDefaultManager",$SEC->sUserName);
$SM->assign("aDefaultWeek",$aDefaultWeek);
$SM->assign("aDefaultTime",$aDefaultTime);

$aManager  = "['','请选择负责人']";
$aManager .= ",['".$SEC->sUserName."','".$SEC->sUserName."']";

$sql = "SELECT `friendid`, `friendusername` FROM ".UC_DBTABLEPRE."friends ";
$sql.= "WHERE `uid`='".$SEC->sUserID."' ";
$sql.= "ORDER BY `friendusername`";
$stmt= $DB->query($sql);
while ($row = $DB->fetchRow($stmt)) {
    $aManager .= ",['".$row["friendusername"]."','".$row["friendusername"]."']";
}
$DB->freeResult($stmt);

$SM->assign("aManager","[".$aManager."]");
$SM->assign("sCreateUser",$SEC->sUserName);

$SM->display('task/projectList.html');
?>